package com.ytjj.qmyx.admin.dao;

import com.ytjj.qmyx.admin.model.CategoryNow;
import com.ytjj.qmyx.admin.model.CategoryNowExample;
import com.ytjj.qmyx.admin.model.request.CategoryNowRequest;
import com.ytjj.qmyx.admin.model.request.ProductCategoryRequest;
import com.ytjj.qmyx.admin.model.response.CategoryNowResponse;
import com.ytjj.qmyx.admin.model.response.ProductCategoryResp;
import com.ytjj.qmyx.admin.model.response.ProductCategoryResponse;
import com.ytjj.qmyx.mall.model.ProductCategory;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/** 
* 
* @returns:
* 
*/
public interface CategoryNowDao {

    //获得第四分类与父级的绑定数据
    List<Map<String,Object>> selectGradeFour();
    //现在商品绑定的就分类关系
    List<Map<String,Object>> selectBottomIdBind(@Param("type") Integer type);

    /**
    * 获得商品和三级分类的关系
    * @returns: java.util.List<java.util.Map<java.lang.String,java.lang.Object>>
    * 
    */
    List<Map<String,Object>> getProductAndCategory(@Param("bottomIdRange") Integer bottomIdRange,@Param("type") Integer type);

    List<ProductCategory> getChildrenCategoryListByPid(@Param("pid") Integer pid);

    List<CategoryNowResponse> list(CategoryNowRequest categoryNowRequest);

    List<CategoryNowResponse> selectCategoryByIds(@Param("ids") List<Integer> ids);

    int alterIncrement();

}